
extends includes/layout.pug

block content
  - var categoriesList = list_categories({ show_count: false })
  - var tagsList = list_tags({ show_count: false })
  - var archivesList = list_archives({ show_count: false })

  div.archive
    if !is_year()

      h1 Archives

      if theme.atom
        p The feed is available via&nbsp;
          a(href=theme.atom) atom
          span .
        br

      aside
        h2 Categories
        if categoriesList
          != categoriesList
        else
          p None.
      br

      aside
        h2 Tags
        if tagsList
          != tagsList
        else
          p None.
      br

      aside
        h2 Archives
        if archivesList
          != archivesList
        else
          p None.
      br

    else

      h1= page.month + '/' + page.year

      - page.posts.each(function(article){
        .archive-list-item
          a(href=url_for(article.path))= article.title
          time(datetime=date_xml(article.date))= date(article.date)
      - })

      #paginator!= paginator()
